package paint;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.geom.Area;
import java.awt.geom.GeneralPath;
import java.util.Vector;
import tag.constants;

public class paintCanvas implements constants{

	static Area grid = new Area();
	static Paint canvas_bg = new Color(255,255,255,10);
	@SuppressWarnings("unchecked")
	static Vector generalPath = new Vector();
	@SuppressWarnings("unchecked")
	public static void generateGrid(){
		int w = frame_width;
		int h = frame_height;


		GeneralPath body;
		

		body = new GeneralPath();
		
		
		body.moveTo(0, 0);

	    
		for(int i=0 ; i<h; i+=cell_size){
			
				body.moveTo(0, i);
				body.lineTo(w,i);
			
			
		}
		
		for(int i=0 ; i<w; i+=cell_size){
			
			body.moveTo(i, 0);
			body.lineTo(i,h);
		
		
	}
		generalPath.addElement(body);
	}
	
	public static void bg(Graphics2D g) {

		//bg.paint(g);
		g.setPaint(new Color(50,50,50));
		g.fillRect(0, 0,frame_width,frame_height);
		g.setPaint(canvas_bg);
	     
	      
	      for (int i = 0; i < generalPath.size(); i++) {
	    	  
	         
	                
		          g.draw((GeneralPath) generalPath.elementAt(i));  
	        
	          
	          
	        }  
		
	}

}
